package cn.snmp.mutual.nms;

public class SnmpNsap extends SnmpString
{
    SnmpNsap() {
    }
    
    public SnmpNsap(final String s) {
        super(s);
        this.Type = 69;
    }
    
    public SnmpNsap(final byte[] bytes) {
        super(bytes);
        this.Type = 69;
    }
    
    @Override
    int encode(final byte[] bytes, final int i) throws ArrayIndexOutOfBoundsException {
        return ASNTypes.encodeOctets(bytes, i, this.byteValue, 0, this.byteValue.length, 69);
    }
    
    static SnmpVar newInstance(final byte[] bytes) {
        final SnmpNsap snmpnsap = new SnmpNsap();
        snmpnsap.Type = 69;
        snmpnsap.byteValue = bytes;
        return snmpnsap;
    }
    
    @Override
    public String toTagString() {
        return "NSAP : " + this.toString();
    }
}
